<template>
    <Header />
    <!-- 路由组件出口的地方 -->
    <router-view />
    <Footer v-if="route.meta.isShow" />
</template>

<script setup lang="ts">
//引入Header与Footer非路由组件
import Header from '@/components/Header.vue'
import Footer from '@/components/Footer.vue'
import {useRoute} from 'vue-router'
import {useHomeStore} from '@/store'
import {onMounted} from 'vue'

const route = useRoute()
const store = useHomeStore()

onMounted(() => {
    //派发一个action 获取商品分类的三级列表的数据
    store.getCategoryList()
})
</script>

<style scoped lang="less"></style>
